package com.zmn.plat.persistence.interfaces.push;

import com.zmn.plat.model.entity.push.notice.PushNoticeAppPutCity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 描述: app公告推送app关系接数据库访问
 *
 * @author wangjie
 * @since 2020/3/24
 **/
public interface PushNoticeAppPutCityDao {

    /**
     * 描述: 根据主键查询数据
     *
     * @param id 主键id
     * @return com.zmn.plat.model.entity.push.notice.PushNoticeAppPutCity
     * @author wangjie
     * @since 2020/3/24
     **/
    PushNoticeAppPutCity findByKey(@Param(value = "id") Integer id);

    /**
     * 描述: 根据公告id查询推送app关系数据
     *
     * @param noticeId 公告id
     * @return java.util.List<com.zmn.plat.model.entity.push.notice.PushNoticeAppPutCity>
     * @author wangjie
     * @since 2020/3/24
     **/
    List<PushNoticeAppPutCity> listByNoticeId(@Param(value = "noticeId") Integer noticeId);

    /**
     * 描述: 根据公告id查询推送app关系数据
     *
     * @param noticeIdList 公告id
     * @return java.util.List<com.zmn.plat.model.entity.push.notice.PushNoticeAppPutCity>
     * @author wangjie
     * @since 2020/3/24
     **/
    List<PushNoticeAppPutCity> listByNoticeIdList(@Param(value = "noticeIdList") List<Integer> noticeIdList);

    /**
     * 描述: 批量新增
     *
     * @param pushNoticeAppPutCityList app 推送关系数据
     * @author wangjie
     * @since 2020/3/24
     **/
    void insertBatch(@Param(value = "pushNoticeAppPutCityList") List<PushNoticeAppPutCity> pushNoticeAppPutCityList);

    /**
     * 描述: 根据公告id删除推送app关系数据
     *
     * @param noticeId 公告id
     * @author wangjie
     * @since 2020/3/24
     **/
    void deleteByNoticeId(Integer noticeId);

}
